@page "/avatars"
@inherits BasePage
@using MduiBlazor.Shared.Pages.Examples.Avatars

<PageTitle>头像</PageTitle>
<div class="mdui-m-y-5">
    <MduiText Typo="@Typo.display1" TextColor="@Colors.Theme.Primary">头像</MduiText>
</div>

<PageContent>
    <PageContentItem Title="示例" OnClick="@(_=>ScrollToElementById("examples"))">
        <PageContentItem Title="图像头像" OnClick="@(_=>ScrollToElementById("img"))" />
        <PageContentItem Title="图标头像" OnClick="@(_=>ScrollToElementById("icon"))" />
        <PageContentItem Title="字符头像" OnClick="@(_=>ScrollToElementById("letter"))" />
    </PageContentItem>
    <PageContentItem Title="组件参数" OnClick="@(_=>ScrollToElementById("attr"))" />
</PageContent>

<MduiDivider Class="mdui-m-y-5" />

<div>
    <h2 id="examples">
        <MduiText Typo="@Typo.headline" TextColor="@Colors.Theme.Primary">示例</MduiText>
    </h2>

    <MduiText id="img" Typo="@Typo.subheading"><b>图像头像</b></MduiText>
    <ExampleSection Component="@typeof(ImgAvatar)" />

    <MduiText id="icon" Typo="@Typo.subheading"><b>图标头像</b></MduiText>
    <ExampleSection Component="@typeof(IconAvatar)" />

    <MduiText id="letter" Typo="@Typo.subheading"><b>字符头像</b></MduiText>
    <ExampleSection Component="@typeof(LetterAvatar)" />
</div>

<MduiDivider Class="mdui-m-y-5" />

<div>
    <h2 id="attr">
        <MduiText Typo="@Typo.headline" TextColor="@Colors.Theme.Primary">组件参数</MduiText>
    </h2>

    <MduiTableContainer UseMduiTypo Class="mdui-m-y-1">
        <MduiSimpleTable>
            <thead>
                <th>参数名称</th>
                <th>类型/返回类型</th>
                <th>说明</th>
            </thead>
            <tbody>
                <tr>
                    <td>
                        <code>ChildContent</code>
                    </td>
                    <td>
                        <code>RenderFragment</code>
                    </td>
                    <td>头像内容。</td>
                </tr>
            </tbody>
        </MduiSimpleTable>
    </MduiTableContainer>
</div>